package com.agent.commons.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 消息转换器配置
 */
@Configuration
@Slf4j
public class MessageConvertorConfig {
    /**
     * 消息转换器
     * @return
     */
    @Bean
    public MessageConverter messageConverter() {
        log.info("消息转换器配置成功!");
        return new Jackson2JsonMessageConverter();
    }
}
